.container
  .ui.menu
    .header.item
      | 新闻管理
    - if params[:type] && params[:id]
      .item
        a href=(new_admin_news_path + '?type=' + params[:type] + '&id=' + params[:id])
          | 添加
  table.ui.celled.table
    thead
      tr
        th
          | 标题
        th
          | 类型
        th
          | 发布时间
        th
          | 操作
    tbody
      - @news.each do |new|
        tr
          td 
            a href=admin_news_path(new)
             = new.title
          td
            = new.newsable_type
          td =new.created_at.strftime("%Y/%m/%d %H:%M")
          td
            a href=edit_admin_news_path(new)
              | 修改
            | | 
            a href=admin_news_path(new) data-method='delete'
              | 删除
    
  = paginate @news
